/*
Jack Morris
11/20/14
Chapter 6
Page 122
Assinment 4
*/
#include <stdio.h>

int main()
{
  float a, b, c;
  do
  {
  printf("\nEnter value of trade:");
  scanf("%f", &a);
  if(a<=0)
  {
    break;
  }
  if(a<2500)
  {
    printf("Comission:%f", 30 + (a * .017));
  }
  if(a >= 2500 && a<=6250)
  {
    printf("\nComission:%f", 56 + (a * .0066));
  }
  if(a>6250 && a<=20000)
  {
    printf("\nComission:%f", 76 + (a * .0034));
  }
  if(a>20000 && a<=50000)
  {
    printf("\nComission:%f", 100 + (a * .0022));
  }
  if(a>50000 && a<=500000)
  {
    printf("\nComission:%f", 155 + (a * .0011));
  }
  if(a > 500000)
  {
    printf("\nComission:%f", 255 + (a * .0009));
  }
  } while(a>0);
  return 0;
}